import request from '@/utils/request'

export default {
  //根据课程id获取章节小节
  getList(id){
    return request({
      url: `/chapter/getListByCourseId/${id}`,
      method: 'get',

    })
  },
  //添加章节
  addChapter(chapter){
    return request({
      url: `/chapter/addChapter`,
      method: 'post',
      data:chapter
    })
  },
  //根据章节id查询章节
  getById(id){
    return request({
      url: `/chapter/getInfoById/${id}`,
      method: 'get',
    })
  },
  //修改章节
  updateChapter(chapter){
    return request({
      url: `/chapter/updateChapter`,
      method: 'post',
      data:chapter
    })
  },
  //添加小节
  addVideo(video){
    return request({
      url: `/video/saveVideo`,
      method: 'post',
      data:video
    })
  },



}




